<?php
namespace AuctionCore\AuctionOrder;


/**
* 场次功能 测试类
* @author       爱民
*/
class SceneTest extends \PHPUnit_Framework_TestCase
{

	private static $scene_info = array(
		 	 'emp_id'    =>'22'
		    ,'name'      =>'测试场'
		    ,'starttime' =>'2015-12-11 05:50:00'
		    ,'endtime'   =>'2015-12-13 05:50:00'
	);
	private $sid = null;

	private function _testCreate(){
		
		$id = Scene::create(self::$scene_info);
		$this->assertTrue(intval($id)>0);
		$this->sid = $id;
	}

	public function testCreate(){
		$this->_testCreate();	
		Scene::remove($this->sid);
	}

	public function testChange(){
		$this->_testCreate();
		$scene_info = self::$scene_info;
		$scene_info['name'] = '测试场次更新';
		$ok = Scene::change($this->sid,$scene_info);
		$this->assertTrue(intval($ok)>0);
		Scene::remove($this->sid);
	}








}

?>